import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lenovo
 * Date: 2025-05-24
 * Time: 14:42
 */
public class Test {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        if(n%3==0&&n%5==0&&n%7==0)
            System.out.println("该数能被3,5,7同时整除");
        else
            System.out.println("该数不能被3，5,7同时整除");
    }
}
